package com.diandi.activity.manager.impl;

import com.diandi.activity.bean.LotteryTicket;
import com.diandi.activity.manager.LotteryTicketManager;
import com.diandi.activity.mapper.CenterLotteryTicketMapper;
import com.diandi.ddsb.bean.TicketUseDetail;
import com.diandi.ddsb.vo.LotteryTicketInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by a on 2018/3/27.
 */
@Component
public class CenterLotteryTicketManagerImpl implements LotteryTicketManager {

    @Autowired
    private CenterLotteryTicketMapper centerLotteryTicketMapper;

    @Override
    public List<LotteryTicket> queryLotteryTickets(Map paramMap) {
        return  centerLotteryTicketMapper.queryLotteryTickets(paramMap);
    }
    @Override
    public Integer queryLotteryTicketCount(Map paramMap) {
        return centerLotteryTicketMapper.queryLotteryTicketCount(paramMap);
    }

    @Override
    public Integer checkLotteryTicketTitle(String title) {
        return centerLotteryTicketMapper.checkLotteryTicketTitle(title);
    }

    @Override
    public Long insertLotteryTicket(LotteryTicket LotteryTicket) {
        return centerLotteryTicketMapper.insertLotteryTicket(LotteryTicket);
    }

    @Override
    public LotteryTicketInfoVo getLotteryTicketById(Long id) {
        return centerLotteryTicketMapper.getLotteryTicketById(id);
    }

    @Override
    public int inserTicketUseDetails(List<TicketUseDetail> details) {
        return centerLotteryTicketMapper.inserTicketUseDetails(details);
    }

    @Override
    public int updateLotteryTicket(LotteryTicket lotteryTicket) {
        return centerLotteryTicketMapper.updateLotteryTicket(lotteryTicket);
    }

    @Override
    public List<LotteryTicket> queryTicketCombox() {
        return centerLotteryTicketMapper.queryTicketCombox();
    }
}
